var arr = [58, 66, 99, 88, 77, 00]

arr.softlsort = function (fu) {
    for (var j = 0; j < this.length; j++) {
        var item = this[j]
        var idx = 0
        for (var i = j + 1; i < this.length; i++) {
            if (fu(item, this[i])) {
                item = this[i]
                idx = i
            }
        }
        if (this[j] !== item) {
            var a = this[j]
            this[j] = this[idx]
            this[idx] = a
        }
    }
    console.log(arr)
}

arr.softlsort(function (a, b) {
    return a > b
})

var arr1 = [1, 2, 3, 4, 5, 6]
arr1.splice(2, 1, { age: 48 })



